<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MarkItUp.Master" 
Inherits="System.Web.Mvc.ViewPage<IEnumerable<Wikey.Entity.Page>>" %>
<%@ Import Namespace="Wikey.Utilities.Extensions"%>


<asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="server">
    <%= Html.ActionLink("Create Page" , "Create" , "Page") %>
    <h1>Index</h1>
        <ul id="PageList">
            <% foreach (var page in Model)
               {%>
                <li 
                  <% if(!String.IsNullOrEmpty(page.Description)) {%>
                  title='<%=page.Description%>'
                  <% }%>
                  > 
                  
                    <%= Html.ActionLink(page.Name, page.FriendlyName, "Pages")%>
                    by 
                      <% if (page.CreatedBy == null) {%>
                        Anonymous
                      <%} else {%>
                        <%= Html.ActionLink(page.CreatedBy.Name, page.CreatedBy.Credential.Username, "My")%>
                        <%} %>
                </li>
            <%} %>    
        </ul>
</asp:Content>
